package com.aspose.cells;

abstract class zawv extends zawf {
   protected zahn a;
   protected zahn b;
   protected zagl c;
   protected zaay d;
   protected zagu e;
   protected boolean f;
   protected boolean g;
   protected boolean h;
   protected boolean i;
   protected zagu j;
   protected boolean k;

   public zawv(zahn var1, zahn var2, zagl var3, zaay var4) {
      this.a = var1;
      this.b = var2;
      this.c = var3;
      this.d = var4;
   }

   public int b() {
      return this.c.b();
   }

   public zagu a(int var1, int var2) {
      zagu var3 = this.a.a(var1, var2);
      if (this.c.a(var3)) {
         return this.c.e();
      } else {
         zagu var4 = this.b.a(var1, var2);
         if (this.a.a(var3) && this.b.a(var4)) {
            if (this.e == null) {
               if (this.c.b(var4)) {
                  this.e = this.c.e();
               } else {
                  this.e = this.c.d();
               }

               this.e.a(false);
            }

            return this.e;
         } else {
            return this.c.b(var4) ? this.c.e() : this.c.d();
         }
      }
   }

   public void f() {
      this.a.f();
      this.b.f();
      this.h = true;
      this.i = true;
      this.f = true;
      this.g = true;
      this.k = false;
   }

   public zagu h() {
      if (this.j != null) {
         return this.j;
      } else {
         if (this.f) {
            if (this.c.a(this.a.h())) {
               this.j = this.c.e();
               return this.j;
            }

            if (this.g) {
               if (this.c.b(this.b.h())) {
                  this.j = this.c.e();
                  return this.j;
               }
            } else if (this.c.b(this.b.o())) {
               if (this.c.f()) {
                  this.k = true;
               }

               this.j = this.c.e();
               return this.j;
            }
         } else {
            if (this.c.a(this.a.o())) {
               if (this.c.f()) {
                  this.k = true;
               }

               this.j = this.c.e();
               return this.j;
            }

            if (this.c.b(this.b.h())) {
               this.j = this.c.e();
               return this.j;
            }
         }

         this.j = this.c.d();
         return this.j;
      }
   }

   public zagu o() {
      if (this.e == null) {
         if (!this.c.a(this.a.o()) && !this.c.b(this.b.o())) {
            this.e = this.c.b(false);
         } else {
            this.e = this.c.e();
         }

         this.e.a(false);
      }

      return this.e;
   }

   public zagu p() {
      if (this.e == null) {
         zagu var1 = this.a.p();
         if (var1 == null) {
            return null;
         }

         if (this.c.a(var1)) {
            this.e = this.c.e();
         } else {
            var1 = this.b.p();
            if (var1 == null) {
               return null;
            }

            if (this.c.b(var1)) {
               this.e = this.c.e();
            } else {
               this.e = this.c.b(true);
               if (this.e == null) {
                  return null;
               }
            }
         }

         this.e.a(false);
      }

      return this.e;
   }

   public boolean a(zagu var1) {
      return var1 == this.e;
   }

   public boolean z() {
      if (!this.c.a()) {
         return false;
      } else {
         return !this.a.z() ? false : this.b.z();
      }
   }

   public void b(boolean var1) {
      this.c.a(var1);
      this.a.b(var1);
      this.b.b(var1);
   }

   public void a(zaay var1) {
      if (this.d != var1) {
         this.d.g = var1.g;
         this.d.h = var1.h;
      }

      this.a.a(this.d);
      this.b.a(this.d);
      this.c.b(this.d);
   }

   public boolean x() {
      return this.a.x();
   }

   public boolean y() {
      return this.a.y();
   }

   public boolean l() {
      return false;
   }

   public boolean a(zaay var1, int[] var2) {
      this.a.a(var1, var2);
      int var3 = var2[0];
      int var4 = var2[1];
      int var5 = var2[2];
      int var6 = var2[3];
      this.b.a(var1, var2);
      if (var3 < var2[0]) {
         var2[0] = var3;
      }

      if (var4 < var2[1]) {
         var2[1] = var4;
      }

      if (var5 > var2[2]) {
         var2[2] = var5;
      }

      if (var6 > var2[3]) {
         var2[3] = var6;
      }

      return true;
   }

   public boolean b(zaay var1, int[] var2) {
      this.a.b(var1, var2);
      int var3 = var2[0];
      int var4 = var2[1];
      this.b.b(var1, var2);
      if (var3 < var2[0]) {
         var2[0] = var3;
      }

      if (var4 > var2[1]) {
         var2[1] = var4;
      }

      return true;
   }

   public boolean a() {
      return this.a.a() && this.b.a();
   }

   public void a(boolean var1) {
      this.a.a(var1);
      this.b.a(var1);
   }

   public boolean A() {
      return true;
   }
}
